﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Engine.Sgml.Matching;
using Engine.Sgml.Merging;
using Engine.Sgml.Allocation;

namespace Engine.Sgml.Validation.Rules {
    class EmptyRule : IValidationRule {
        public SName Name {
            get { return SName.Empty; }
            }

        public bool Ignore(SElement element, SElement ancestor) {
            return false;
            }

        public bool IsEmpty(SElement element) {
            return false;
            }

        public bool CanClose(SElement element, SElement endElement) {
            if (ElementMatcher.Match(element, endElement))
                return true;
            else
                return false;
            }

        public bool CanContain(SElement element, SElement ancestor) {
            return true;
            }

        public bool CanSurround(InconsistentBlock block, SElement ancestor) {
            return false;
            }

        public bool Surround(InconsistentBlock block, SElement ancestor) {
            throw new NotSupportedException();
            }
        }
    }
